<template>
    <div class = "twodimensioncode">
         <el-container v-loading = "loading">
        <el-container>
        <el-main>
               <el-breadcrumb separator="/">
                <el-breadcrumb-item style="font-weight: bold;cursor:pointer"  @click.native = "goBack">基地管理</el-breadcrumb-item>
                <el-breadcrumb-item  >二维码</el-breadcrumb-item>
                </el-breadcrumb>
            <div class = "ewm-wrapper">
             <p>{{basename}}</p>
             <div class = "ewmimg-wrapper">
             <img :src="this.ewm + '/api/v1/qr/code/' + basename " alt="">
             </div>
             </div>
        </el-main>
        </el-container>
         </el-container>
    </div>
</template>
<script>
export default {
    data(){
        return{
            loading:false,
            basename:'',
            srcImg:'http://r56m7y.natappfree.cc/api/v1/qr/code/测试基地'
        }
    },
    created(){
        this.List()
    },
    methods:{
        List(){
                this.loading = true
                this.basename = this.$route.query.basename
                this.srcImg = this.ewm + '/api/v1/qr/code/' + this.basename
                this.loading = false
        },
        goBack(){
            this.$router.push('Addbase')
        }
    }
}
</script>
<style scoped>
.twodimensioncode{
    width:100%;
}
.twodimensioncode .ewm-wrapper{
    width:500px;
    height:500px;
    margin: 80px auto;
    text-align: center;
    font-weight: bold;
}
.twodimensioncode .ewm-wrapper .ewmimg-wrapper{
     width:400px;
     height:400px;
     margin: 0px auto;
}
.twodimensioncode .ewm img{
    width:400px;
}
</style>
